package dao;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.ibatis.sqlmap.client.SqlMapClient;

import vo.SimpleObjVo;

public class SimpleDao extends SqlMapClientDaoSupport{

	private SqlMapClient sqlMapClient;
	
	public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
	       super.setSqlMapClient(sqlMapClient);
	   }
	public SimpleObjVo select(SimpleObjVo obj) {
		return (SimpleObjVo)getSqlMapClientTemplate().queryForObject("simple_select",obj);
	}

	public List<SimpleObjVo> selectList(SimpleObjVo obj) {
		return getSqlMapClientTemplate().queryForList("simpleList_select", obj);
	}

	public void insert(SimpleObjVo obj) {
		getSqlMapClientTemplate().insert("simple_insert", obj);
	}

	public int update(SimpleObjVo obj) {
		return getSqlMapClientTemplate().update("simple_update", obj);
	}

	public int delete(SimpleObjVo obj) {
		return getSqlMapClientTemplate().delete("simple_delete", obj);
	}
}
